package com.xmz.client;

import com.xmz.entity.Order;
import com.xmz.util.PageResult;
import com.xmz.util.Result;
import com.xmz.vo.OrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "order",url = "http://localhost:9003/orderApi")
public interface OrderClient {

    @PostMapping("/loadList")
    PageResult<Order> loadList(@RequestParam Integer pageNo, @RequestParam Integer pageSize,@RequestBody(required = false) OrderVo orderVo);

    @GetMapping("/getAllOrder")
    List<Order> getAll();

    @PostMapping("/addOrder")
    Result addOrder(@RequestBody Order order);
}
